#include<iostream>
#define _CRT_SECURE_NO_WARNINGS
using namespace std;
//class A
//{
//public:
//	A(int a1 = 1)
//		:_a1(a1)
//	{
//
//	}
//	A(int a1 = 1, int a2 = 1)
//		:_a1(a1)
//		,_a2(a2)
//	{
//
//	}
//private:
//	int _a1;
//	int _a2;
//};
using STDataType = int;
//class Stack
//{
//public:
//	Stack(int _capacity = 4)
//	{
//		_arr = (STDataType*)malloc(sizeof(STDataType));
//		_capacity = _top = 0;
//	}
//	void Push(const A& a)
//	{
//		
//	}
//private:
//	STDataType* _arr;
//	int _top;
//	int _capacity;
//};
class B;
class A
{
	friend void func(const A& a, const B& b);
public:
	A(int a1 = 1, int a2 = 2)
		:_a1(a1)
		,_a2(a2)
	{

	}
private:
	int _a1;
	int _a2;
};
class B
{
	friend void func(const A& a, const B& b);
public:
	B(int b1 = 3, int b2 = 4)
		:_b1(b1)
		,_b2(b2)
	{

	}
private:
	int _b1;
	int _b2;
};
//using STDataType = int;
//class Stack
//{
//public:
//	Stack(int _capacity = 4)
//	{
//		_arr = (STDataType*)malloc(sizeof(STDataType));
//		_capacity = _top = 0;
//	}
//	void Push(const A& a)
//	{
//
//	}
//private:
//	STDataType* _arr;
//	int _top;
//	int _capacity;
//};
class Sum
{
public:
	Sum()
	{
		Sum::Count++;
	}
	static int Get()
	{
		return Count;
	}
private:
	static int Count;
};
int Sum::Count = 0;
void func(const A& a, const B& b)
{
	cout << a._a1 << endl;
	cout << b._b1 << endl;
}

class c1
{
public:
	class c2
	{
	public:
		void func()
		{
			
		}
	private:
		int _c;
		int _d;
	};
private:
	int _a;
	int _b;
};


template <class T>
class Stack
{
public:
	Stack(int capacity = 4)
		:_capacity(capacity)
	{
		_arr = new T[_capacity];
		_top = 0;
	}
	~Stack()
	{
		delete[]_arr;
	}
private:
	T* _arr;
	int _top;
	int _capacity;
};
template <class T>
void Swap( T& left,  T& right)
{
	cout << left << right << endl;
}
int main()
{
	int a = 1, b = 2;
	double c = 10.1, d = 20.1;
	Stack<int> st1;
	Stack<double> st2;

}